package com.app.miwawa.api.eam.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.annotation.Chosen;
import org.framework.common.api.support.annotation.ChosenType;
import org.framework.common.api.support.annotation.Search;

/**
 * 教务系统－课程管理
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2015年12月28日 上午10:07:24
 * @version 1.0.2015
 */
@Entity @Table(name = "TB_EAM_LESSON_INFO")
public class Lesson extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -7945273796762168220L;

	// 课程编码
	@Column(name = "code", length = 50, nullable = true)
	private String code;
	
	// 课程类型
	@Search
	@Column(name = "type", length = 10, nullable = true)
	private String type;
	
	// 课程名称
	@Search
	@Column(name = "name", length = 50, nullable = true)
	private String name;
	
	// 固定课时
	@Column(name = "period", length = 10, nullable = true)
	private String period;
	
	// 适用月龄（小）
	@Column(name = "moonage_min", length = 10, nullable = true)
	private String moonageMin;
	
	// 适用月龄（大）
	@Column(name = "moonage_max", length = 10, nullable = true)
	private String moonageMax;
	
	// 课程描述
	@Lob @Basic(fetch=FetchType.LAZY)
	@Column(name = "description", nullable = true)
	private String description;

	@Override
	@Chosen(type=ChosenType.VALUE)
	public String getId() {
		return super.getId();
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Chosen(type=ChosenType.TEXT)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPeriod() {
		return period;
	}

	public void setPeriod(String period) {
		this.period = period;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getMoonageMin() {
		return moonageMin;
	}

	public void setMoonageMin(String moonageMin) {
		this.moonageMin = moonageMin;
	}

	public String getMoonageMax() {
		return moonageMax;
	}

	public void setMoonageMax(String moonageMax) {
		this.moonageMax = moonageMax;
	}
	
}
